Skip to main content

Behavior Actions

IO River supports a variety of actions that can be added to a behavior, including the following.

Cache Control

Cache Behavior

This action controls whether content should be cached by the CDN.

Arguments:

  • Behavior - Select either Cache or Bypass.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Cache TTL

This action specifies the duration the CDN is allowed to keep content in the cache. When the TTL expires, the CDN will attempt to revalidate the content using an IMS request.

Arguments:

  • Cache TTL - Duration in seconds.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Status Code Cache

This action provides control over caching by status code. You can set the cache TTL for specific status codes or groups (e.g., 4xx). This action can be used to control the caching of errors.

Arguments:

  • Status Code Cache - Either a specific status code or a group of status codes.
  • Behavior - Select either Cache or Bypass.
  • Cache TTL - Duration in seconds.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Browser Cache TTL

This action controls how long the browser is allowed to cache the content. The CDN will add a Cache-Control header to the response sent to end-users with the configured cache TTL.

Arguments:

  • Cache TTL - Duration in seconds.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Status Code Browser Cache

This action controls browser caching by status code. For specified status codes, the CDN will add a Cache-Control header to the response with the configured TTL.

Arguments:

  • Status Code Cache - Either a specific status code or a group of status codes.
  • Cache TTL - Duration in seconds.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Add Cache Tag

This action controls adding tags to content stored in the CDN cache, which allows you to purge portions of the cache later on (purge by tag).

Arguments:

  • Tag Name - The name for the tag to add.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Cache Tag Response Header

This action allows you to seemlessly use headers generated by the origin, which contain cache tags, on all the CDN providers. For example, if your origin returns a Edge-Cache-Tag header in the response, set the action to recognize this header and the tag will be used on CDNs that do not obey this header normally.

Arguments:

  • Tag Name - The header name created on the origin that contains the cache tag.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Cache Key

This action provides control over how content is stored in the CDN cache. You can select the components of the cache key used to store objects in the CDN cache. For example, if you specify the Origin header as part of the cache key, the CDN will store different copies of the response in the cache for different values of Origin in the request header.

Arguments:

  • Headers - List of headers to be included in the cache key. Select Include to specify a list of headers, or None to exclude all headers.
  • Query Strings - List of query string parameters to include or exclude in the cache key. You can also choose to include all or none.
  • Cookies - List of cookies to include in the cache key. Select Include to specify a list of cookies, or None to exclude all cookies.
  • Country - Select Include to add the request's originating country in the cache key (default: exclude).
  • Device Type - Select Include to add the device type the request was sent from in the cache key (default: exclude).
CDN providers that support this action
ComponentVCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
HeaderYYYYYYYYYYYY
Query StringYYYYYYYYYYYY
CookieYYYYYYYYYYYY
Device TypeYYYY
CountryYYYYY

Cached Methods

This action controls the list of HTTP methods whose responses the CDN will cache.

Arguments:

  • Cached Methods - List of HTTP methods.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Origin Cache Control

This action controls whether the CDN should honor the Cache-Control header sent by the origin. By default, origin Cache-Control headers are not honored by the CDN.

Arguments:

  • Enabled - Flag to enable or disable origin cache control.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYY

Stale TTL

This action sets the time duration the CDN can serve expired content from the cache. If the content is expired and there is a problem fetching it from the origin, the CDN can serve stale content for the specified duration.

Arguments:

  • Cache TTL - Duration in seconds.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYY

Access Control

Allowed Methods

This action controls the list of HTTP methods allowed for this service. If an end user attempts to use a disallowed method, the CDN responds with status code 405.

Arguments:

  • Allowed Methods - List of HTTP methods.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Viewer Protocol

This action controls how the CDN should respond to HTTP requests. The CDN can either accept both HTTP and HTTPS, redirect HTTP to HTTPS, or restrict access to HTTPS only. If HTTPS-only is selected, the CDN will respond with a 403 status code to HTTP requests.

Arguments:

  • Policy - Type of viewer protocol policy.
CDN providers that support this action
ComponentVCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
RedirectHttpToHttpsYYYYYYYYYYY
HttpsOnlyYYYY
HttpAndHttpsYYYYY

URL Signing

This action controls whether the CDN should verify the URL signature before allowing access to the content.
For more information, refer to Signed URLs.

Arguments:

  • URL Signing - Flag to enable or disable signature verification.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYY

Deny Access

This action controls whether the CDN should deny access to requests that meet the behavior condition.

Arguments:

  • Deny Access - Flag to enable or disable denying access.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Deny Access By IP

This action controls whether the CDN should deny access to a specific set of IP addresses.

Arguments:

  • IP Addresses - A list of IP addresses to deny access.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Deny Access By Time

This action controls whether the CDN should deny access during a specific time period. The time period can be either a fixed interval or a recurring one.

Arguments:

  • Repeatable - Indicates whether the time interval is periodic.

Arguments for a non-periodic interval:

  • Time Range - The UTC start and end time of the interval.

Arguments for a periodic interval:

  • Start Time - The start time in UTC.
  • Deny Duration - The duration of time to deny access.
  • Repeat Period - The interval at which the deny access rule repeats.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Allow Access Only From IP

This action controls whether the CDN should allow access to a specific set of IP addresses, and deny access from all others.

Arguments:

  • IP Addresses - A list of IP addresses to allow access.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYY

Performance Optimization

Compression

This action controls whether the CDN should compress responses from the origin before sending them to end users. CDN compression applies only to compressible file types.

Arguments:

  • Enabled - Flag to enable or disable compression.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Large Files Optimization

This action controls how the CDN handles large files (over 50MB). Enable this flag if you are working with large files. When enabled, the CDN stores large file in segments within the cache.

Arguments:

  • Enabled - Flag to enable or disable large file optimization.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYY

Header Control

Host Header Override

This action controls the Host header sent in requests to the origin. By default, the viewer's Host header is sent to the origin, but this action allows customization.

Arguments:

  • Host Header Value - The custom Host header value.
  • Use Origin Host - If checked, the origin domain will be used for the Host header.
CDN providers that support this action
ComponentVCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
Header OverrideYYYYYYYY
Use OriginYYYYYYYY

Set CORS Header

This action controls CORS headers added to the end-user response.

Arguments:

  • CORS Header Name - Type of CORS header.
  • Header Value - Value of the header to set.
  • Override - If checked, any existing CORS header with the same name will be overridden.
CDN providers that support this action
ComponentVCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
Allow CredentialsYYYYYYYYYYYY
Allow HeadersYYYYYYYYYYYY
Allow MethodsYYYYYYYYYYYY
Allow OriginYYYYYY
Expose HeadersYYYYYYYYYYYY
Max AgeYYYYYYYYYYYY

Set Request Header

This action adds a custom header to requests sent to the origin.

Arguments:

  • Header Name - Name of the header to set.
  • Header Value - Value of the header to set.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYY

Set Provider Name Request Header

This action adds a custom header to requests sent to the origin, with the value of the CDN serving the request.

Arguments:

  • Header Name - Name of the header to set.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYY

Delete Request Header

This action removes a specified header from the end-user request.

Arguments:

  • Header Name - Name of the header to delete.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYY

Set Response Header

This action adds a custom header to the response sent to end-users. For setting CORS headers, use the Set CORS Header action.

Arguments:

  • Header Name - Name of the header to set.
  • Header Value - Value of the header to set.
  • Override - If checked, any existing header with the same name will be overridden.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYYYYYY

Set Provider Name Response Header

This action adds a custom header to the response sent to the origin, with the value of the CDN serving the request.

Arguments:

  • Header Name - Name of the header to set.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYY

Delete Response Header

This action removes a specified header from the end-user response.

Arguments:

  • Header Name - Name of the header to delete.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Delete Origin Response Header

This action removes a specified header generated by the origin, from the when the content is stored in the CDN cache, which allows you to override behaviors generated on the origin. For example, you can use it to delete the "Cache-Control" header, so that this header will not impact caching.

Arguments:

  • Header Name - Name of the header to delete.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Other Actions

Redirect to URL

This action enables sending a redirect response with a specified URL.

Arguments:

  • Destination - URL to redirect to.
  • Source - Optional wildcard path to match in order to redirect multiple URLs
CDN providers that support this action
ComponentVCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
StaticYYYYYYYYY
DynammicY

URL Rewrite

This action enables rewriting the request path. The destination path can be a static string or can be derived from a regular expression. This action takes place before the content is retrieved from the cache.

Arguments:

  • Source - The source request path.
  • Destination - The new path, which can be either a static string or a regex.

Example:

The definition below removes the static prefix from the request path:

  • Source: /static/(.*)
  • Destination: /$1
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYY

Stream Log

This action allows streaming CDN access logs to your logging destination (e.g., an S3 bucket). All logs are streamed in a unified format, regardless of the CDN generating them.

Arguments:

  • Log Destination - Storage destination for the logs. You can configure the log destination as described here.
  • Sample Rate - Percentage of logs to stream.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYYYYY

Generate Preflight Response

This action controls how the CDN should respond to a preflight request. The CDN can respond to a preflight request without forwarding it to the origin. You can configure the headers to include in the preflight response.

Arguments:

  • Allowed Methods - Value for the Access-Control-Allow-Methods header.
  • Max-Age - Value for the Access-Control-Max-Age header.
  • Allowed Headers - Value for the Access-Control-Allow-Headers header.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
Y

Generate Response

This action allows you to return a reponse to the viewer, as generated by the origin on a fixed path.

Arguments:

  • Status Code - The HTTP status code viewers will receive.
  • Response Page Path - The path to the URI where the response is generated.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY

Follow Redirects

This action enables the CDN to follow a redirect response from the origin. If the origin responds with a redirect, the CDN will follow it and return the response to the end user.

This action has the following limitations:

  • The host in the Location header must be defined as an origin in the service.
  • The scheme in the Location header must be HTTPS.

Arguments:

  • Enabled - Flag to enable or disable follow redirects.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YYYYY

True Client IP

This action controls whether the CDN should add a True-Client-IP header when forwarding the request to the origin.

Arguments:

  • True Client IP - Flag to enable or disable adding the header.
CDN providers that support this action
VCDNFastlyCloudFrontCloudflareAkamaiGCP CloudGCP MediaCacheflyAzure CDNBunny CDNGcoreMainstreaming
YY